﻿

using IotContract.Dtos.Servers.Process;
using IotContract.Models;
using IotContract.Models.Clients.Hks;
using IotContract.Models.Fmts;
using IotContract.Models.Jobs;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IotContract.Interfaces.Fmt;
public interface IRemoteHttpService
{
    /// <summary>
    /// 提交碟盘机碟盘完成
    /// </summary>
    /// <param name="tagNumber"></param>
    /// <returns></returns>
    Task<RemoteReturnModel<string>> CommitMagazine(int tagNumber);
    /// <summary>
    /// 提交扫码枪数据
    /// </summary>
    /// <param name="unitTag"></param>
    /// <param name="trays"></param>
    /// <returns></returns>
    Task<RemoteReturnModel<EcsCvWrite>> CommitBcrResult(CvUnitTagDto unitTag, List<string> trays);

    /// <summary>
    /// 获取远程SC任务
    /// </summary>
    /// <param name="jobId"></param>
    /// <returns></returns>
    Task<RemoteReturnModel<ScRemoteTask>> GetScRemoteTask(string jobId);

    /// <summary>
    /// 堆垛机状态提交
    /// </summary>
    /// <param name="taskDefine"></param>
    /// <returns></returns>
    /// <exception cref="NotImplementedException"></exception>
    Task<RemoteReturnModel<EcsWriteData>> CommitScTaskID(ScTaskDefine taskDefine);


    /// <summary>
    /// 提交移库任务
    /// </summary>
    /// <param name="scTask"></param>
    /// <returns></returns>
    Task<RemoteReturnModel<string>> CommitFmtMoveJob(ScTaskDefine scTask);

    /// <summary>
    /// 根据库位获取入库任务
    /// </summary>
    /// <param name="stage"></param>
    /// <returns></returns>
    Task<RemoteReturnModel<List<ScEnterJob>>> GetEnterJobsByStage(StageArrayData stage);

    /// <summary>
    /// 获取移库任务
    /// </summary>
    /// <param name="stage"></param>
    /// <returns></returns>
    Task<RemoteReturnModel<ScMoveTask>> GetFmtMoveJob(MoveStage stage);
    /// <summary>
    /// 是否远程超时
    /// </summary>
    /// <returns></returns>
    bool IsRemoteTimeout();

    /// <summary>
    /// 提交设备状态结果
    /// </summary>
    /// <param name="equipStatus"></param>
    /// <returns></returns>
    Task<RemoteReturnModel<string>> CommitEquipStatus(RemoteEquipStatus equipStatus);
    /// <summary>
    /// 提交设备报警结果
    /// </summary>
    /// <param name="equipStatus"></param>
    /// <returns></returns>
    Task<RemoteReturnModel<string>> CommitEquipWarn(RemoteEquipWarn equipWarn);

    /// <summary>
    /// 提交充放电报警
    /// </summary>
    /// <param name="error"></param>
    /// <param name="stage"></param>
    /// <returns></returns>
    /// <exception cref="NotImplementedException"></exception>
    Task<RemoteReturnModel<string>> CommitFmtWarn(string error, int stage);
    /// <summary>
    /// 提交充放电结果
    /// </summary>
    /// <param name="data"></param>
    /// <returns></returns>
    Task<RemoteReturnModel<string>> CommitChargeFMTResult(ChargeTrayResult data);

    /// <summary>
    /// 提交充放电移库信息
    /// </summary>
    /// <param name="stageMove"></param>
    /// <returns></returns>
    Task<RemoteReturnModel<string>> CommitFmtMove(StageMoveInstruct stageMove);
    /// <summary>
    /// 获取组盘信息
    /// </summary>
    /// <param name="trayNo"></param>
    /// <param name="equipCode"></param>
    /// <returns></returns>
    Task<RemoteReturnModel<TrayCellStatus>> GetTrayGroup(string trayNo, string equipCode, int id);
    /// <summary>
    /// 提交OCV结果
    /// </summary>
    /// <param name="data"></param>
    /// <returns></returns>
    Task<RemoteReturnModel<OCVCellMain>> CommitOcvResult(OCVTrayResult data);
    /// <summary>
    /// 获取充放电复测配方数据
    /// </summary>
    /// <param name="trayCode"></param>
    /// <returns></returns>
    Task<RemoteReturnModel<ChargeStartData>> GetReTestChargeFMT(string trayCode);
    /// <summary>
    /// 获取充放电配方数据
    /// </summary>
    /// <param name="trayCode"></param>
    /// <returns></returns>
    Task<RemoteReturnModel<ChargeStartData>> GetChargeFMTData(string trayCode);
    /// <summary>
    /// 检验是否为NG托盘
    /// </summary>
    /// <param name="trayID"></param>
    /// <returns></returns>
    Task<RemoteReturnModel<string>> CheckNGResult(string trayID);

    /// <summary>
    /// 筛选机获取电芯数据
    /// </summary>
    /// <param name="trayCode"></param>
    /// <returns></returns>
    Task<RemoteReturnModel<SelCellResult>> GetSelCellData(string trayCode, int groupNumber);
    /// <summary>
    /// 筛选机获取电芯数据
    /// </summary>
    /// <param name="trayCode"></param>
    /// <returns></returns>
    Task<RemoteReturnModel<string>> CommitSelResult(string trayCode);
}
